		{if empty($footer_off)}
			<div class="text-center footer" style="margin:10px 0; width:100%; text-align:center; word-break:break-all;">
				{if !empty($_W['page']['footer'])}
					{$_W['page']['footer']}
				{else}
					{if IMS_FAMILY != 'x'}<a href="http://www.we7.cc">关于微擎</a>&nbsp;&nbsp;<a href="http://bbs.we7.cc">微擎帮助</a>{/if}
				{/if}
				&nbsp;&nbsp;{$_W['setting']['copyright']['statcode']}
			</div>
		{/if}
		{if !empty($_W['quickmenu']['menus']) && empty($_W['quickmenu']['disabled'])}
			<?php include_once template($_W['quickmenu']['template'], TEMPLATE_INCLUDEPATH);?>
		{/if}
		<script>require(['bootstrap']);</script>
	</div>
	<style>
		h5{color:#555;}
	</style>
	<script type="text/javascript">
		require(['WeixinApi','jquery'], function(WeixinApi, $){
			<?php
				if(!empty($_W['acid'])) {
					$acidinfo = account_fetch($_W['acid']);
				}
				$_share['title'] = !empty($_share['title']) ? $_share['title'] : $_W['account']['name'];
				if(empty($_share['link'])) {
					$_share['link'] = '';
					$query_string = $_SERVER['QUERY_STRING'];
					if(!empty($query_string)) {
						//加上分享人的uid
						parse_str($query_string, $query_arr);
						$query_arr['u'] = $_W['member']['uid'];
						$query_string = http_build_query($query_arr);
						$_share['link'] = $_W['siteroot'].'app/index.php?'. $query_string;
					}
				}
			?>
			//图片地址
			{if !empty($_share['imgUrl'])} 
				var _share_img = "{$_share['imgUrl']}";
				if(_share_img.indexOf("http://") == -1 && _share_img.indexOf("https://") == -1 ) _share_img = "{$_W['attachurl']}" + _share_img;
			{else}
				var _share_img = $('body img:eq(0)').attr("src");
				if(typeof(_share_img) == "undefined") _share_img = "{$_share['imgUrl']}";
				if(_share_img.indexOf("http://") == -1 && _share_img.indexOf("https://") == -1 ) _share_img = "{$_W['attachurl']}" + _share_img;
			{/if}
			//分享内容
			{if empty($_share['content'])}
				var _share_content = _removeHTMLTag($('body').html());
				if(typeof _share_content == 'string'){
					_share_content = _share_content.replace("{$_share['title']}", '')
				}
			{else}
				var _share_content = "{php echo preg_replace('/\s/i', '', str_replace('	', '', cutstr(str_replace('&nbsp;', '', ihtmlspecialchars(strip_tags($_share['content']))), 60)));}";
			{/if}

			WeixinApi.ready(function(Api) {
				// 微信分享的数据
				var wxData = {
					"appId": "{$acidinfo['key']}", // 服务号可以填写appId
					"imgUrl" : _share_img,
					"link" : "{$_share['link']}",
					"desc" : _share_content,
					"title" : "{$_share['title']}"
				};
				var wxCallbacks = {
					confirm : function(resp) {
						// todo: 
						if(window['onshared'] && typeof(window['onshared']) == 'function'){
							window['onshared']();
						}
					}
				};
				Api.shareToFriend(wxData, wxCallbacks);
				Api.shareToTimeline(wxData, wxCallbacks);
				Api.shareToWeibo(wxData, wxCallbacks);
				Api.generalShare(wxData,wxCallbacks);
			});
		});
	</script>
</body>
</html>
